<template>
	<view class="teachmain">
	<uni-nav-bar shadow title="" @clickLeft="back" height="88rpx" :border="false" :fixed="true"
		backgroundColor="#f8f8f8" :shadow="false" left-icon="left">
		<view class="input-view" style="background:#FFFFFF;width:2200rpx;">
			<uni-icons class="input-uni-icon" type="search" size="18" color="#999" />
			<input style="background:#FFFFFF;" confirm-type="search" class="nav-bar-input" type="text" placeholder="输入搜索关键词"
				@confirm="confirm" />
		</view>
	</uni-nav-bar>
		<view class="" v-html="info.content">
			
		</view>
	</view>
</template>

<script>
	import {
		mapState,
		mapActions
	} from 'vuex';
	import wanlShopPage from '@/components/wanl-shop/page';
	import wanlShopFind from '@/components/wanl-shop/find';
	import wanlShopCategory from '@/components/wanl-shop/category';

	export default {
		components: {
			wanlShopPage,
			wanlShopFind,
			wanlShopCategory
		},
		computed: {
			...mapState(['common', 'user', 'update'])
		},

		data() {
			return {
				headHeight: 75,
				windowHeight: 0,
				teacherInfo:{},
				headTop: 0,
				page:1,
				info:{},
				value:'1',
				TrainType:'',
				teacherList:[],
				contentText: {
					contentdown: '下拉加载更多',
					contentrefresh: '加载中',
					contentnomore: '我是有底线的'
				}
			};
		},
		created() {
				console.log(this.$route.query)
				this.TrainType= this.$route.query.type
					this.getListData()
		},
		onShow() {
			// #ifdef APP-PLUS
			plus.navigator.setFullscreen(false);
			// #endif
			// 计算页面尺寸
			let sys = this.$wanlshop.wanlsys();
			this.headTop = sys.top;
			this.headHeight = sys.height + uni.upx2px(60);
			this.windowHeight = sys.windowHeight;
			setTimeout(() => {
				uni.setNavigationBarColor({
					frontColor: this.$store.state.common.modulesData.homeModules.page ?
						this.$store.state.common.modulesData.homeModules.page.style
						.navigationBarTextStyle : '',
					backgroundColor: this.$store.state.common.modulesData.homeModules.page ?
						this.$store.state.common.modulesData.homeModules.page.style
						.navigationBarBackgroundColor : ''
				});
			}, 200);
		
		},
		onReady() {
			// 判断网络类型
			uni.getNetworkType({
				success: res => {
					if (res.networkType == '2g' || res.networkType == '3g' || res.networkType == '4g') {
						this.$wanlshop.msg('当前使用非WIFI环境，请注意流量使用');
					} else if (res.networkType == 'none') {
						this.$wanlshop.msg('没有网络');
					}
				}
			});
		},
		methods: {
			back() {
				uni.navigateBack({
					delta: 1
				})
			},
			...mapActions({
				download: 'update/download', // 立即下载
				ignore: 'update/ignore' // 忽略更新
			}),
			change(e) {
				console.log(e);
			},
			getListData(){
				let vm =this
				vm.$api.get({
					url: '/offline_train/info',
					data:{
						offline_train_id:vm.TrainType
					},
					success: res => {
						console.log(res)
						vm.info =res
						uni.redirectTo({
							url:'/pages/product/goods?id='+res.goods.id+'&showbuyCart='+res.goods.is_show_cart
						})
						// this.BannerList = res.banner
					}
				})
			},
		}
	};
</script>

<style lang="scss">
    /deep/.uni-navbar__header-btns-left{
        width: 20px !important;
    }
    /deep/.uni-navbar__header-btns-right{
        width: 0px !important;
    }
	.teachmain{
		.teachtap{
			// height: 188rpx;
			background: #FFFFFF;
			position: relative;
			.inputserch{
				position: fixed;
				top:115rpx;
				left: 50%;
				margin-left: -315rpx;
				width: 630rpx;
				height: 60rpx;
				border: 1rpx solid #E3DEBF;
				border-radius: 50px;
			}
		}
			
		.TeacherItem{
			display: flex!important;
				width: 710rpx;
			    height: 228rpx;
			    background: #FFFFFF;
			    border-radius: 16rpx 16rpx 16rpx 16rpx;
			    opacity: 1;
				margin: 10rpx 20rpx 0;
				box-sizing: border-box;
				padding: 20rpx 30rpx;
				text-align: center;
				
				.right{
					.daibiao{
						font-size: 36rpx;
						font-family: PingFang SC;
						font-weight: bold;
						line-height: 36rpx;
						color: #333333!important;
						// text-shadow: 0px 0px 48rpx rgba(151, 151, 151, 0.2);
						// opacity: 1;
					}	
					.title{
						display: flex;
						justify-content: space-between;
						align-items: center;
							
						text{
							color: #777;
						}
					}
				}
				.left{
					margin-right: 30rpx;
					image{
						width: 124rpx;
						height: 124rpx;
					}
					
				}
					
				.fileList{
					overflow: hidden;
					    white-space: nowrap;
						width: 500rpx;
					    margin-top: 20rpx;
					.fileItem{
						display: inline-block;
						width: 20%;
							
						view{
						}
						// height: ;
						image{
							width: 60rpx;
							height: 60rpx;
							border-radius: 50%;
						}
					}
				}
			}
			.content{
				
			}
			.content::before{
				
			}
				
			.cu-custom{
				line-height: 90rpx;
			}
		
	}		
</style>
